import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
import {resolve} from "path"

// https://vite.dev/config/
export default defineConfig({
    plugins: [vue()],
    server: {
        host: "localhost",
        port: 5381,
        open: true,
        proxy:{
            "/api":{
                target:"http://localhost:8085",
                changeOrigin:true,
                rewrite:url=>url.replace(/^\/api/,"/api/v1")
            }
        }
    },
    resolve: {
        alias: {
            '@': resolve(__dirname, "src")
        }
    }
})
